﻿@{
    ViewBag.Title = "登录";
    ViewBag.Background = "(" + Url.Content("~/Content/images/Account/Login/LoginBG.gif") + ")";
}

<script type="text/javascript">
    $(document).ready(function () {
        $('#RememberMe').wijcheckbox();
        $(":input[type='radio']").wijradio();
        $("div input[type='text'],div input[type='password']").wijtextbox();
        $("#dialog-confirm").wijdialog({
            autoOpen: false,
            resizable: false,
            height: 515,
            width: 400,
            modal: true,
            buttons: {
                "注册": function () {
                    var user = $("#reg-form").serialize();
                    $.ajax({
                        type: 'post',
                        url: '@Url.Content("~/Account/Register")',
                        data: user,
                        success: function (msg) {
                            $(this).wijdialog("close");
                            if (msg == "success") {
                                alert("注册成功。");
                                $("#dialog-confirm").wijdialog("close");
                            } else {
                                $("#RegisterMessage").html(msg);
                            }
                        },
                        error: function () {
                            alert("服务器异常,请稍后再试。");
                        }
                    });
                },
                "取消": function () {
                    $(this).wijdialog("close");
                }
            },
            captionButtons: {
                refresh: { visible: false },
                maximize: { visible: false }
            },
            show: "blind",
            hide: "explode",
            collapsingAnimation: { animated: "puff", duration: 300, easing: "easeOutExpo" },
            expandingAnimation: { animated: "highlight", duration: 300, easing: "easeOutExpo" }
        });

        $("#btnLogin").click(function () {
            var RememberMe = false;
            if ($("#RememberMe").attr("checked") == "checked") {
                RememberMe = true;
            }
            $.ajax({
                type: 'post',
                url: '@Url.Content("~/Account/Login")',
                data: "UserID=" + $("#UserID").val() + "&Password=" + $("#Password").val() + "&RememberMe=" + RememberMe + "&ReturnUrl=@ViewBag.ReturnUrl",
                success: function (msg) {
                    if (msg != "Fail") {
                        if (msg == "") {
                            window.location.href = "/";
                        }
                        else {
                            window.location.href = msg;
                        }
                    } else {
                        $("#Message").html("提供的用户名或密码不正确");
                    }
                },
                error: function () {
                    alert("服务器异常,请稍后再试。");
                }
            });
        });
    });

    function btnRegister_Click() {
        $("#Message").html("");
        $('#dialog-confirm').wijdialog('open');
    }
</script>

<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
    <!--  Center body -->
    <tr>
        <td width="15%"></td>
        <!-- Main Table-->
        <td width="70%">
            <table border="0" cellspacing="0" cellpadding="0" align="center">
                <!--  Top Blank -->
                <tr>

                    <td width="934px" align="center" height="150px">
                        <img  src="@Url.Content("~/Content/images/Account/Login/LoginLine.png")" width="934" height="159" border="0" align="bottom" /></td>

                </tr>
                <!-- End Top Blank -->
                <tr>
                    <td>
                        <table width="934px" border="0" cellspacing="0" cellpadding="0" align="center" style="background-image:url(@Url.Content("~/Content/images/Account/Login/LoginForm.png")); background-repeat:no-repeat">
                            <tr height="71px">
                                <td colspan="5"></td>
                            </tr>
                            <tr height="306px">
                                <td width="72px"></td>
                                <!--Message-->
                                <td width="334px">
                                    <table border="0" cellspacing="0" cellpadding="0">
                                        <tr>
                                            <td style="font-family: '微软雅黑'; font-size: 18px; height: 37px; color: #0d0101;" valign="bottom" align="left">近期征稿启示
                                            </td>
                                        </tr>
                                        <tr>
                                            <td height="31px">
                                                <img src="@Url.Content("~/Content/images/Account/Login/VIPLogin_12.png")"/></td>

                                        </tr>
                                        <tr>
                                            <td height="158px">
                                                <div id="message" style="height: 158px; width: 350px; margin-top: -80px; margin-left: 0px; border: 1px solid #d5dee9; position: absolute; padding: 0; line-height: 35px; font: 14px '微软雅黑'; background-color: #fff;">
                                                    <ul style="list-style-type: none; margin-left: -30px">
                                                        @foreach (var item in ViewBag.消息)
                                                        {
                                                            <li>
                                                                <a href="http://www.baidu.com" style="color: #0d0c0c; font: 15px '微软雅黑'; padding: 3px; text-decoration: none;"
                                                                    onmouseover="this.style.color=' #ff006e'" onmouseout="this.style.color='black'">[消息] @item.标题</a>
                                                            </li>
                                                        }
                                                    </ul>
                                                    <div style="float: right; margin-right: 10px;">
                                                        <a href="http://www.baidu.com" style="color: #0d0c0c; font: 15px '微软雅黑'; padding: 3px; text-decoration: none;"
                                                            onmouseover="this.style.color=' #ff006e'" onmouseout="this.style.color='black'">更多消息 ...</a>
                                                    </div>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td height="80px"></td>
                                        </tr>
                                    </table>
                                </td>
                                <!-- End Message-->
                                <td width="128px"></td>
                                <!-- Login-->
                                <td width="344px">
                                    <table border="0" cellspacing="0" cellpadding="0">
                                        <tr>
                                            <td style="font-family: '微软雅黑'; font-size: 18px; height: 38px; color: #0d0101;" valign="bottom" align="left">用户登录
                                            </td>
                                        </tr>
                                        <tr>
                                            <td height="29px">
                                                <img src="@Url.Content("~/Content/images/Account/Login/VIPLogin_17.png")"/>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td height="47px">
                                                <input id="UserID" name="UserID" type="text" style="width:335px; height:37px; font-family: '微软雅黑'; font-size: 18px; border:1px solid #d5dee9;font-weight:bold;background-image:url(@Url.Content("~/Content/images/Account/Login/userIcon.png")); background-repeat:no-repeat;	background-position:right center;" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td height="16px"></td>
                                        </tr>
                                        <tr>
                                            <td height="47px">
                                                <input id="Password" name="Password" type="password" style="width:335px; height:37px; font-family: '微软雅黑'; font-size: 18px; border:1px solid #d5dee9;font-weight:bold;  color:#5f5d5e;background-image:url(@Url.Content("~/Content/images/Account/Login/pwdIcon.png")); background-repeat:no-repeat;	background-position:right center;"/>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td id="Message" height="25px" style="font: 12px '微软雅黑'; color: #f00" align="right"></td>
                                        </tr>
                                        <tr>
                                            <td height="21px">
                                                <span style="color: #262424; font-size: 13px; font-family: '微软雅黑';">
                                                    <input id="RememberMe" name="RememberMe" value="true" type="checkbox" style="vertical-align: central; text-align: center;" />
                                                    <label for='RememberMe' style="font-family: '微软雅黑'">下次自动登录</label>
                                                </span>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td height="31px"></td>
                                        </tr>
                                        <tr>
                                            <td height="41px">
                                                <table border="0" cellspacing="0" cellpadding="0">
                                                    <tr>
                                                        <td width="140px"></td>
                                                        <td width="92px">
                                                            <input id="btnLogin" name="btnLogin" type="submit" value="" style="background:url(@Url.Content("~/Content/images/Account/Login/VIPLogin_09.png")) no-repeat ; vertical-align:central;border-style:none;
                                       width:92px; height:41px" title="登录" />
                                                        </td>
                                                        <td width="20px"></td>
                                                        <td width="92px">
                                                            <input name="btnRegister" type="submit" value="" style="background:url(@Url.Content("~/Content/images/Account/Login/VIPLogin_10.png")) no-repeat ; vertical-align:central;border-style:none;
                                       width:92px; height:41px" title="注册" onclick="btnRegister_Click()" />
                                                        </td>
                                                    </tr>
                                                </table>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td height="11px"></td>
                                        </tr>
                                    </table>
                                </td>
                                <!-- End Login-->
                                <td width="56px"></td>
                            </tr>
                            <tr height="36px">
                                <td colspan="5"></td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <!-- shadow-->
                <tr>
                    <td height="61px">
                        <img src="@Url.Content("~/Content/images/Account/Login/LoginShadow.png")" width="934" height="61" /></td>
                </tr>
                <!-- End shadow-->
            </table>
        </td>
        <td width="15%"></td>
    </tr>
    <!--End  Center body -->
</table>

<!--Register ConfirmDialog -->
<div id="dialog-confirm" title="用户注册" style="font: 14px '微软雅黑'">
    <form id="reg-form">
        <table border="0" cellpadding="2" cellspacing="0" align="center" style="margin-left: -10px">
            <tr>
                <td align="right">用户名:</td>
                <td>
                    <input id="用户ID" name="用户ID" type="text" /><span style="color: red">*</span></td>
            </tr>
            <tr>
                <td align="right">密码:</td>
                <td>
                    <input id="密码" name="密码" type="password" /><span style="color: red">*</span></td>

            </tr>
            <tr>
                <td align="right">确认密码:</td>
                <td>
                    <input id="确认密码" name="确认密码" type="password" /><span style="color: red">*</span></td>
            </tr>
            <tr>
                <td align="right">密码提示问题:</td>
                <td>
                    <input id="密码提示问题" name="密码提示问题" type="text" /></td>
            </tr>
            <tr>
                <td align="right">密码提示答案:</td>
                <td>
                    <input id="密码提示答案" name="密码提示答案" type="text" /></td>
            </tr>
            <tr>
                <td align="right">姓名:</td>
                <td>
                    <input id="姓名" name="姓名" type="text" /><span style="color: red">*</span></td>
            </tr>
            <tr>
                <td align="right">性别:</td>
                <td>
                    <table>
                        <tr>
                            <td>
                                <input type='radio' name="性别" value="男" checked="checked" id='radioMen' />
                                <label for='男' style="font-family: '微软雅黑'">男</label></td>
                            <td width="5px"></td>
                            <td>
                                <input type='radio' name="性别" value="女" id='radioFemale' /><label for='女' style="font-family: '微软雅黑'">女</label></td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td align="right">所在单位:</td>
                <td>
                    <input id="单位" name="单位" type="text" /></td>
            </tr>
            <tr>
                <td align="right">职务:</td>
                <td>
                    <input id="职务" name="职务" type="text" /></td>
            </tr>
            <tr>
                <td align="right">手机:</td>
                <td>
                    <input id="手机" name="手机" type="text" /></td>
            </tr>
            <tr>
                <td align="right">办公电话:</td>
                <td>
                    <input id="办公电话" name="办公电话" type="text" /></td>
            </tr>
            <tr>
                <td align="right">电子邮件:</td>
                <td>
                    <input id="电子邮件" name="电子邮件" type="text" /></td>
            </tr>
            <tr>
                <td colspan="2" id="RegisterMessage" style="font: 12px '微软雅黑';color: #f00;text-align:right;margin:20px;"></td>
            </tr>
        </table>
    </form>
</div>
<!--End Register -->

<!-- CopyRight Table-->
<div style="font-family: '微软雅黑'; font-size: 12px; text-align: center; color: #fff; bottom: 0; margin: 0 auto; position: fixed; height: 23px; line-height: 23px; width: 100%; z-index: 999; opacity: .60; filter: alpha(opacity=60); _bottom: auto; _width: 100%; _position: absolute; _top: expression(eval(document.documentElement.scrollTop+document.documentElement.clientHeight-this.offsetHeight-(parseInt(this.currentStyle.marginTop, 10)||0)-(parseInt(this.currentStyle.marginBottom, 10)||0)));">
    技术支持：信息技术处  靳健
</div>
<!-- End CopyRight-->
